/*
 * $Id: ActTaskFtRecord.java,v 1.7 2009/10/13 16:24:54 oliver Exp $
 *
 * Copyright (C) 2006 General Electric Company. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 *
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */

package com.ge.healthcare.autosc.common.database.pojo;

import com.ge.healthcare.autosc.common.ASCUtil;

/**
 * ActTaskFtDetails entity. @author MyEclipse Persistence Tools
 */
public class ActTaskFtRecord extends AbstractTaskFtRecord implements
		java.io.Serializable {
	/**
	 * Eclipse generated
	 */
	private static final long serialVersionUID = 7957424142875717704L;

	public static final String TABLE_NAME = "com.ge.healthcare.autosc.common.database.pojo.ActTaskFtRecord";

	public static final String COL_ID = "id";
	public static final String COL_TASK_ID = "id.taskId";
	public static final String COL_FT_ID = "id.ftId";

	
	public static final String SUCCESS_CODE_NAME = "PRC_S_FT_001";
	public static final String FAILURE_CODE_NAME = "PRC_F_FT_001";

	// Constructors

	/** default constructor */
	public ActTaskFtRecord() {
	}

	/** full constructor */
	public ActTaskFtRecord(ActTaskFtRecordId id, String codeName, String fileUrl) {
		super(id, codeName, fileUrl);
	}

	public boolean hasSuccessfullyBeenTransferred() {
		if (ASCUtil.isNullOrEmpty(this.getCodeName())) {
			return false;
		}
		if (SUCCESS_CODE_NAME.equals(this.getCodeName())) {
			return true;
		}
		return false;
	}

	public String toString() {
		StringBuffer definition = new StringBuffer();
		definition.append("{ID=").append(this.getId()).append("},");
		definition.append("{File Url=").append(this.getFileUrl()).append("},");
		definition.append("{Code Name=").append(this.getCodeName()).append("}");
		return definition.toString();
	}
}
